package day01.set;

import java.util.HashSet;
import java.util.LinkedHashSet;

/**
 * @author feng
 * @Date 2021/10/17 14:45
 *   唯一、有序
 *   实现数据的有序输出
 */
class LinkedHashSetTest {
    public static void main(String[] args) {
        LinkedHashSet hset = new LinkedHashSet();
        hset.add(20);
        hset.add(30);
        hset.add(50);
        hset.add(80);
        hset.add(20);
        System.out.println(hset);
        System.out.println(hset.size());



    }
}
